// 封装所有与轮播图相关的数据请求
import http from '@/utils/http.js'

// 获取轮播图数据
export const getBannerListAPI = (params) => {
    return http({
      url: "/admin/banner/list",
      method: "get",
      params,
    });
  };
// 修改轮播图数据
export const updateBannerStateAPI = (data) => {
    return http({
      url: "/admin/banner/updateFlag",
      method: "post",
      data,
    });
  };
//删除单条数据
export const deleteBannerAPI = (params) => {
  return http({
    url: "/admin/banner/delete",
    method: "get",
    params,
  });
};
// 插入轮播图数据
export const addBannerAPI = (data) => {
  return http({
    url: "/admin/banner/add",
    method: "post",
    data,
  });
};